package com.yeren.collection.collection;
/**
 * 该类用于测试集合存入的元素
 * @author Administrator
 *
 */
public class Element {
	private int row;
	private int col;
	public int getRow(){
		return row;
	}
	public void setCol(int col) {
		this.col = col;
	}
	public void setRow(int row){
		this.row=row;
	}
	public int getCol(){
		return col;
	}
	public String toString(){
		return "("+row+","+col+")";
	}
	public boolean equals(Object o){
		if(o==null){
			return false;
		}
		if(o==this){
			return true;
		}
		if(o instanceof Element){
			Element e=(Element)o;
			return this.col==e.col&&this.row==e.row;
		}else{
			return false;
		}
	}
}
